<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>边界符</title>
  </head>
  <body>
    <script>
      var reg = /^abc/;
      var reg2 = /abc$/;
      console.log('测试1--', reg.test('dabc'));
      console.log('测试2--', reg2.test('ddabc'));
    </script>
  </body>
</html>
